home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / COMPILER / SATHER / !Sather / Library / Base / test / sa / fltd < prev    next >
Text File  |  1996-04-09  |  1KB  |  31 lines

  1. ---------------------------> Sather 1.1 source file <--------------------------
  2. -- test_fltd.sa: 
  3. -- Author: Benedict A. Gomes <gomes@samosa.ICSI.Berkeley.EDU>
  4. -- Copyright (C) 1995, International Computer Science Institute
  5. -- $Id: fltd_test.sa,v 1.2 1996/04/09 10:04:22 borisv Exp $
  6. --
  7. -- COPYRIGHT NOTICE: This code is provided WITHOUT ANY WARRANTY
  8. -- and is subject to the terms of the SATHER LIBRARY GENERAL PUBLIC
  9. -- LICENSE contained in the file: Sather/Doc/License of the
  10. -- Sather distribution. The license is also available from ICSI,
  11. -- 1947 Center St., Suite 600, Berkeley CA 94704, USA.
  12. -------------------------------------------------------------------
  13. class TEST_FLTD_OUTPUT is
  14.     include TEST;
  15.     
  16.     main is
  17.     class_name("FLTD_OUTPUT");
  18.     test("str 1",(0.1234567d).str,"0.123457"); -- ok? davids or om must
  19.     -- verify that this is the desired behaviour.
  20.     test("str prec=2",(-1234.12345d).str(2),"-1.2e+03");
  21.     test("str prec=3",(-1234.12345d).str(3),"-1.23e+03");
  22.     test("str prec=4",(1234.12345d).str(4),"1234");
  23.     test("str prec=5",(1234.12345d).str(5),"1234.1");
  24.     test("str prec=6",(1234.12345d).str(6),"1234.12");
  25.     finish;
  26.     end;
  27.     
  28. end; -- class TEST_FLTD
  29.  
  30. -------------------------------------------------------------------
  31.